#ifndef PST_DATACHOSENLISTDIALOG_H
#define PST_DATACHOSENLISTDIALOG_H

#include <ElaWidget.h>
#include <QItemSelection>
#include <QModelIndexList>

class ElaListView;
class ElaCheckBox;
class QVBoxLayout;

namespace pst
{
    class DataChosenListDialog : public ElaWidget
    {
        Q_OBJECT
    public:
        DataChosenListDialog(QWidget* parent = nullptr);

        void setData(const QList<QString>& data);
        QList<QString> getData() const;
        void updateUI();
        void setSelctedIndexs(const QList<int>& indexs);
    signals:
        void signal_sentChosenDataIds(const QModelIndexList& chosenID);

    private slots:
        void slot_selectionChanged(
            const QItemSelection& selected,
            const QItemSelection& deselected);

        void slot_okButtonClicked();
    private:
        QList<QString> m_data;
        ElaListView* _listView;
        QVBoxLayout* _page1Layout;
        ElaCheckBox* _chooseAllCheckBox;
    };
}

#endif